import request from "@/utils/requestMd5";



export function list(params) {
  return request({
    url: "/company/list",
    method: "get",
    params
  });
}

export function getCompanyDetail(params) {
  return request({
    url: "/company/getCompanyDetail",
    method: "get",
    params
  });
}

//新增客户->新增代理商
export function addCompany(data) {
  return request({
    // url: "/company/addCompany",
    url: "/agent/operateAgent",
    method: "post",
    data
  });
}

// 代理商列表
export function getQueryList(data) {
  return request({
    url: "/agent/list",
    method: "get",
    data
  });
}

// 审核代理商前查询的代理商信息
export function queryInfo(data) {
  return request({
    url: "/agent/info",
    method: "get",
    data
  });
}

//城配所要绑定的批发商列表
export function getAllCompany(params) {
  return request({
    url: "/company/getAllCompany",
    method: "get",
    params
  });
}

//修改客户
export function editCompany(data) {
  return request({
    url: "/company/editCompany",
    method: "post",
    data
  });
}

// 供应商审核
export function agentExamine(data) {
  return request({
    url: "/agent/operateAgent",
    method: "post",
    data
  });
}

//产品列表
export function productByComId(data) {
  return request({
    url: "/company/productByComId",
    method: "get",
    data
  });
}

//产品列表-排除菜单列表
export function menuListExclude(data) {
  return request({
    url: "/company/menuListExclude",
    method: "get",
    data
  });
}

//排除菜单
export function excludeMenu(data) {
  return request({
    url: "/company/excludeMenu",
    method: "post",
    data
  });
}

//获取超级管理员列表
export function administratorByComId(data) {
  return request({
    url: "/agent/administratorByAgentId",
    method: "get",
    data
  });
}
//修改超级管理员密码
export function changePassword(data) {
  return request({
    url: "/agent/changePasswordAgentAdmin",
    method: "post",
    data
  });
}
//免密操作
export function loginNoPass(data) {
  return request({
    url: "/agent/loginAgentNoPass",
    method: "get",
    data
  });
}

//导出
export function userexports(data) {
  return request({
    url: "/export/exportsCompany",
    method: "post",
    responseType: "blob",
    data
  });
}

//客服选择
export function getCustList(data) {
  return request({
    url: "company/getCustListAll",
    method: "get",
    data
  });
}

//客服列表
export function getList(data) {
  return request({
    url: "company/getCustList",
    method: "get",
    data
  });
}

//新增客服
export function addCust(data) {
  return request({
    url: "company/addCust",
    method: "post",
    data
  });
}

//编辑详情
export function editList(data) {
  return request({
    url: "company/getCustDetail",
    method: "get",
    data
  });
}
//编辑客服
export function editCust(data) {
  return request({
    url: "company/editCust",
    method: "post",
    data
  });
}
//根据客服id，获取客户列表
export function getchatlist(data) {
  return request({
    url: "company/getUserListByCustId",
    method: "get",
    data
  });
}

//根据客户id，获取聊天记录
export function getchatrecord(data) {
  return request({
    url: "company/getMsgListByUserId",
    method: "get",
    data
  });
}
